#!/bin/awk -f

BEGIN{FS="\t";OFS="\t";}

ARGIND==1{
  a[$1]=$2 OFS $3;
}

ARGIND==2{
  b[$1]=$2 OFS $3;
}

END{
  for (x in a)
  {
    if (x in b)
    {
      print x, a[x], b[x];
    }
  }
}
